// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App';
import router from './router';
import ElementUI from 'element-ui';
import bus from '@/js/common/bus.js';
import './less/base/commonClass.less'
import './less/base/common.less';
//import 'element-ui/lib/theme-chalk/index.css';
Vue.config.productionTip = false;
Vue.use(ElementUI, {
	size: 'small',
	"z-index": 1
});
/* eslint-disable no-new */
import httptool from './js/plugins/zry.plugins.httptool.js';
Vue.prototype.httptool = httptool;
import tool from './js/plugins/zry.plugins.tool.js';
import apis from '@/js/data/zry.data.apiurls.js';
Vue.prototype.tool = tool;
Vue.prototype.apis = apis;

import validatetool from './js/plugins/zry.plugins.validate.js';
Vue.prototype.validatetool = validatetool;

Vue.prototype.globaldata = {
	imgBaseUrl: httptool.rootUrl + apis.imgBaseUrl,
	imgThumbUrl: httptool.rootUrl + apis.imgThumbUrl
}

//组件
Vue.component('v-multipleUpload', resolve => require(['@/components/multipleUpload/multipleUpload.vue'], resolve));
Vue.component('v-imgupload', resolve => require(['@/components/imgupload/imgupload.vue'], resolve));
Vue.component('price-header', resolve => require(['@/components/price-header'], resolve));
Vue.component('v-header', resolve => require(['@/components/header/index.vue'], resolve));
Vue.component('v-content', resolve => require(['@/components/content/index.vue'], resolve));
Vue.component('v-footer', resolve => require(['@/components/footer/index.vue'], resolve));
Vue.component('v-centerleft', resolve => require(['@/components/centerleft/index.vue'], resolve));

Vue.component('v-centertop', resolve => require(['@/components/commoncenter/centertop.vue'], resolve));
Vue.component('v-empty', resolve => require(['@/components/empty'], resolve));
Vue.component('v-counter', resolve => require(['@/components/counter'], resolve));
Vue.component('input-single-checkbox', resolve => require(['@/components/form/input-single-checkbox.vue'], resolve));
Vue.component('input-checkbox', resolve => require(['@/components/form/input-checkbox.vue'], resolve));
Vue.component('input-num', resolve => require(['@/components/form/input-num.vue'], resolve));
import echarts from 'echarts';
Vue.prototype.$echarts = echarts;

import filters from './js/plugins/zry.plugins.filters.js';
Object.keys(filters).forEach((key) => {
	Vue.filter(key, filters[key])
})

import BaiduMap from 'vue-baidu-map'
 
Vue.use(BaiduMap, {
 ak: 'lAW6GP6dEoDcXRBkujwYLu5h9Fncmd00'  //这个地方是官方提供的ak密钥
})


import './main/window.js'; //window变量
import { store } from './store';
let app = new Vue({
	el: '#app',
	router,
	store,
	components: {
		App
	},
	template: '<App/>'
});